package com.coolingme.base.generic;

import org.junit.jupiter.api.Test;

/**
 * 自定义泛型方法
 *
 * @author wangyue
 * @date 2023/3/2 14:51
 */
public class U<X, Y, Z> {

    public <X, Y> void hello(X x, Y y) {
        System.out.println("x = " + x.getClass());
        System.out.println("y = " + y.getClass());
    }

    @Test
    public void test() {

        U<String, Double, Integer> u = new U<>();
        u.hello("Hello World", 11d);
        System.out.println("-------------------");
        u.hello("Hello World", 11);
        System.out.println("-------------------");
        u.hello(11, "Hello World");

    }

}





